<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=utf-8>
<#include "../inc/commonJs.html">
<script type="text/JavaScript">
	function doSave(){
		var url = "<#if id??>editImages.do?id=${id}<#else>addImages.do</#if>";
		$('form').form('submit',{  
		    url:url,
		    onSubmit:function(){
				return $(this).form('validate');
		    },  
		    success:function(data){  
				top.closemodalwindow(true,data);
		    }  
		});
	}
	//
	$(function(){
		if(${obj.position!}!=0){
			$("#position").combobox('setValue','${obj.position!}');
		}
	})
</script>

</head>
<body>
<div class="easyui-panel" data-options='fit:true,border:false'> 
<form align="center" method="post" enctype='multipart/form-data'>
<#if obj.id??>
<input type="hidden" name="id" value="${obj.id!}"/>
<input type="hidden" name="zt" value="${obj.zt!1}"/>
</#if>
<table align=center border="0" width="98%"  cellspacing="0" cellpadding="0" class="table_all">
<tr> 
	<td width="100" height="35" class="td_table_1">图片位置：</td>
	<td width="*"  class="td_table_2">&nbsp;
		<input id="position" class="easyui-combobox" name="position" style="width:200px;" panelHeight="130" data-options="valueField:'mxdm',textField:'mxmc',url:'listPositionForCombox.do'" />
	</td>
</tr>
<tr> 
	<td width="100" height="35" class="td_table_1">图片标题：</td>
	<td width="*" class="td_table_2">&nbsp;
		<input name="title" class="easyui-validatebox" required="true" type="TEXT" maxlength=60  style="width:200px;" value="${obj.title!}">
	</td>
</tr>
<tr> 
	<td width="100" height="35" class="td_table_1">图片链接：</td>
	<td width="*" class="td_table_2">&nbsp;
		<input name="url" type="TEXT" class="easyui-validatebox" required="true" maxlength=60  style="width:200px;" value="${obj.url!}">
	</td>
</tr>
<#if obj.id?exists>
	<tr> 
		<td width="100" height="30"  class="td_table_1">显示图片：</td>
		<td width="*"  class="td_table_2">
			&nbsp;
			<img src="${request.contextPath}/uploadfile/${obj.path!}" onload="if(this.width>500) this.width=500" onerror="if(this.width>500) this.width=500">
		</td>
	</tr>
</#if>
<tr> 
	<td width="100" height="35" class="td_table_1">上传图片：</td>
	<td width="*"  class="td_table_2">
		&nbsp;
		<input type="file" name="imgfile" value="浏览">【注】请上图片的传格式为 jpg 或 gif
	</td>
</tr>
</table>
</form>
</div>
</body>
</html>